<template>
	<view class="com userlist-com">
		<image class="list-img" :src="listInfo.headPortrait" mode="aspectFit"></image>
		<view class="user-name-box">
			<text class="user-name">{{listInfo.name}}</text>
			<!-- <text class="type-btn type-success">教师</text> -->
		</view>
		<view class="user-source no-warp">
			<text class="level-btn level-btn-success" v-if="listInfo.capabilityLevel==='初级技术经纪人'">{{listInfo.capabilityLevel}}</text>
			<text class="level-btn level-btn-warning" v-else-if="listInfo.capabilityLevel==='中级级技术经纪人'">{{listInfo.capabilityLevel}}</text>
			<text class="level-btn level-btn-danger" v-else="listInfo.capabilityLevel==='高级技术经纪人'">{{listInfo.capabilityLevel}}</text>
		</view>
	</view>
</template>

<script setup lang="ts">
	import { onMounted, ref } from 'vue';
	const props = defineProps({
		listInfo: { type: Object, default: {} },
	})
</script>

<style lang="scss">
	

	.userlist-com {
		background-color: #fff;
		padding: 20rpx;
		border-radius: 8rpx;
		margin-bottom: 20rpx;
		box-shadow: 0px 8rpx 16rpx 0px rgba(47, 101, 243, 0.1);
		display: inline-block;
		text-align: center;
		width: 100%;

		.list-img {
			width: 110rpx;
			height: 110rpx;
			border-radius: 110rpx;
			border: solid 1px #eee;
		}

		.user-name-box {
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 26rpx;
			margin-top: 10rpx;
		}

		.user-name {
			margin-right: 10rpx;
		}

		.user-source {
			font-size: 24rpx;
			margin-top: 10rpx
		}

		.level-btn {
			font-size: 24rpx;
			padding: 6rpx 10rpx;
		}

		.level-btn-success {
			background: rgba(4, 209, 103, 0.1);
			color: #04D167;
		}
		.level-btn-warning {
			background: rgba(240, 173,78, 0.1);
			color: #f0ad4e;
		}
		.level-btn-danger {
			background: rgba(221, 82, 77, 0.1);
			color: #dd524d;
		}
	}
</style>